<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试MD节点</title>
</head>
<body>
    <h1>测试MD节点渲染</h1>
    <p>打开浏览器控制台，然后执行以下代码来设置测试数据：</p>
    <pre>
const testData = {
  "nodes": [
    {
      "id": "start-node-1",
      "type": "circle",
      "x": 200,
      "y": 200,
      "properties": {
        "width": 80,
        "height": 80
      },
      "text": {
        "x": 200,
        "y": 200,
        "value": "开始"
      }
    },
    {
      "id": "md-node-1754230240702",
      "type": "md-node",
      "x": 400,
      "y": 200,
      "properties": {
        "mdContent": "# 测试节点\n\n这是一个测试的Markdown节点\n\n- 双击进入编辑模式\n- Ctrl+Enter保存内容",
        "width": 200,
        "height": 150
      }
    }
  ],
  "edges": []
};
localStorage.setItem('logicflow-data', JSON.stringify(testData));
console.log('测试数据已保存到localStorage');
location.reload();
    </pre>
    <button onclick="setTestData()">设置测试数据并刷新</button>
    
    <script>
    function setTestData() {
        const testData = {
            "nodes": [
                {
                    "id": "start-node-1",
                    "type": "circle",
                    "x": 200,
                    "y": 200,
                    "properties": {
                        "width": 80,
                        "height": 80
                    },
                    "text": {
                        "x": 200,
                        "y": 200,
                        "value": "开始"
                    }
                },
                {
                    "id": "md-node-1754230240702",
                    "type": "md-node",
                    "x": 400,
                    "y": 200,
                    "properties": {
                        "mdContent": "# 测试节点\n\n这是一个测试的Markdown节点\n\n- 双击进入编辑模式\n- Ctrl+Enter保存内容",
                        "width": 200,
                        "height": 150
                    }
                }
            ],
            "edges": []
        };
        localStorage.setItem('logicflow-data', JSON.stringify(testData));
        console.log('测试数据已保存到localStorage');
        window.open('http://localhost:3001/', '_blank');
    }
    </script>
</body>
</html>